import React, { Component } from 'react';
/* 
  事件传参
  1. bind 
  onClick={this.handleClick.bind(this,{msg:"666",answer:"能不六吗？"})}
  2.箭头函数
   onClick={()=>this.handleClick("111","2222","33333")}
  3.data属性传
   data-msg={"????"}
    console.log(e.currentTarget.dataset.msg)
    console.log(e.target.dataset.msg)
https://zh-hans.reactjs.org/docs/handling-events.html
*/
class Tesing extends Component {
    handleClick=(e)=>{
       console.dir(e)
       console.log(e.currentTarget.dataset.msg)
       console.log(e.target.dataset.msg)
    }
    render() {
        return (
            <div>
                <button data-msg={"????"} onClick={this.handleClick}>传个参数过来玩玩</button>
            </div>
        );
    }
}

export default Tesing;
